#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    QString result = "你今天的安排是：";
    if (ui->checkBox_class->isChecked())
        result += ui->checkBox_class->text() + " ";
    if (ui->checkBox_play->isChecked())
        result += ui->checkBox_play->text() + " ";
    if (ui->checkBox_sleep->isChecked())
        result += ui->checkBox_sleep->text();
    ui->label->setText(result);
}
